<template>
  <div>
    <div>
      <div v-for="(i,v) in datas.list" :key="v"  class="content-container">
        <p class="content">{{i.class}}</p>
        <div v-for="(ii,vv) in i.mobj" :key="vv" class="content-item">
          <span class="line">{{ii.amOrPm == true ? '上午' : '下午'}}</span>
            <div class="content-item-text">
              <ul>
                <li class="list-li" @click="itemClick(i)" v-for="(i,title) in ii.obj.titles" >
                  {{i}}
                </li>
              </ul>
            </div>
          <!-- </div> -->
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      datas: {}
    },
    name: 'EvDayTask',
    methods:{

    },
    methods:{
      itemClick(i) {
        this.$emit('itemClick',i)
      }
    }
  }
</script>

<style>
  .content-container {
    text-align: left;
    margin-left: 16px;
  }
  .content {
    margin-right: 16px;
    font-size: 14px;
    font-weight: 500;
  }
  .content-item {
    width: 100%;
    margin-top: 2px;
    margin-bottom: 2px;
    height: auto !important;
    display: flex;
    position:relative;
    align-items: center;
  }
  .content-item-text {
    position: relative;
    display: flex;
    height: auto !important;
    left: 6px;
    width: calc(100% - 10px - 19px);
    top: 2px;
    padding-bottom: 4px;
    right: 2px;
    align-items: flex-start;
    font-size: 12px;
    font-weight: 500;
    color: #3E7EFF;
    z-index: 3;
    background-color: rgba(62,126,255,0.1);
    overflow: hidden;
  }
  .line {
    color: #A1A1A1;
  }
  .list-li {
    margin-left: 8px;
  }
  .list-li::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0.10667rem;
    height: auto;
    z-index: -1;
    background: #3E7EFF;
  }
  .line:after {
    position: absolute;
    content: '';
    margin-top: 8px;
    width: calc(100% - 10px - 17px);
    height: 1px;
    line-height: 14px;
    display: inline-block;
    background-color: #E4E4E4;
    margin-left: 5px;
    margin-right: 5px;
  }
  .line:before {
    max-width: 0px;
  }
</style>
